#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@author:jidi
@file:session_factory.py
@time:2022/08/14
"""
from service.wework.api.calendar_http_api import CalendarHttpApi
from service.wework.model.calendar import Calendar
from service.wework.model.calendar_api import CalendarApi
from service.wework.model.session import Session


class CalendarFactory:
    @classmethod
    def create(cls, implement, session: Session, calendar: Calendar):
        if implement == 'service':
            return CalendarHttpApi(session)
        else:
            return CalendarApi(session)
